<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>管理后台首页</title>
    <link rel="stylesheet" href="{$CSS}/bootstrap3.3.7.min.css">
    <style>
        em{
            font-size: 20px;
            color: red;
            vertical-align: middle;
            line-height: 20px;
            height: 20px;
            display: inline-block;
        }
        .mar{
            margin-right:10px
        }
        .pic{
        	float:none;margin-bottom:10px
        }
        .pic img{
        	width: 393px;
    		height: 75px;
    	}
		 .pics{
        	float:none;margin-bottom:10px
        }
        .pics img{
        	width:80px;
    		height: 80px;
    	}
        .ontow{
            color: red;
            width: 100%
        }
    </style>
</head>
<body style="overflow-x:hidden;"> 
    <div style="padding:10px;border-bottom:1px solid #eee;font-size:15px;font-weight:700">微信开放平台设置</div>
    <div style="margin:40px auto;">
        <div class="bs-example" data-example-id="simple-horizontal-form">
            <form class="form-horizontal" method="post" action="" name="clientForm" id="clientForm" onsubmit="return checksub();">
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>AppId</label>
                    <div class="col-sm-3">
						{$u->text('AppId','class="form-control"  placeholder="AppId"')}
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>AppSecret</label>
                    <div class="col-sm-3">
                        {$u->text('AppSecret','class="form-control"  placeholder="AppSecret"')}
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>token</label>
                    <div class="col-sm-3">
                        {$u->text('token','class="form-control"  placeholder="token"')}
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>EncodingAESKey</label>
                    <div class="col-sm-3">
                        {$u->text('EncodingAESKey','class="form-control"  placeholder="EncodingAESKey"')}
                    </div>
                </div>
                <div class="form-group">
                   <label for="inputPassword3" class="col-sm-2 control-label"></label>
                    <div class="col-sm-6">
                        <input class="btn btn-success mar" ID="btnAdd" type="submit" value="提交">
                    </div>
                </div>
            </form>
        </div>

    </div>
</body>
<script src="/layui/layui.js"></script>
<script>
layui.use(['element', 'layer', 'upload'], function () {
  var layer = layui.layer;
});
$('.select_img').on('click',function  () {
  var targetId=this.getAttribute('data-target');
  layer.open({
    title:'图片库',
    type: 2,
    area: ['700px', '450px'],
    fixed: false, //不固定
    maxmin: false,
    content: '/imgLib/libs.html?type=vshop_img&target='+targetId
  });
})

window.uploadImgCallback=function (tgt,url) {
  console.log('选择图片结果',tgt,url);
  if(tgt=='logo'){
    var inputEle=$('#'+"{$u->elid('logo')}");
    var prevEle=$('#pic_logo');
    inputEle.val(url);
    prevEle.attr('src',url);
  }else if(tgt=='pics'){
	var inputEle=$('#'+"{$u->elid('qr_code')}");
    var prevEle=$('#pic_pics');
    inputEle.val(url);
    prevEle.attr('src',url);
  }
};

</script>  
</html>